# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=deepce
pkgver=121.a08648d
pkgrel=1
pkgdesc='Docker Enumeration, Escalation of Privileges and Container Escapes.'
arch=('any')
groups=('blackarch' 'blackarch-exploitation')
url='https://github.com/stealthcopter/deepce'
license=('Apache')
depends=('bash' 'lxc' 'podman' 'kubectl' 'docker' 'curl' 'wget' 'nmap' 'python'
         'bind' 'jq')
makedepends=('git')
source=("git+https://github.com/stealthcopter/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

package() {
  cd $pkgname

  install -dm 755 "$pkgdir/usr/bin"
  install -dm 755 "$pkgdir/usr/share/$pkgname"

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname" *.md

  rm *.md LICENSE

  cp -a * "$pkgdir/usr/share/$pkgname/"

  ln -sf "/usr/share/$pkgname/$pkgname.sh" "$pkgdir/usr/bin/$pkgname"
}

